<!DOCTYPE html>
<html lang="en" style="height: 100%;" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <script type="text/javascript" src="http://192.168.232.130:8088/web-apps/apps/api/documents/api.js"></script>
  <script type="text/javascript">
    var  config = {
      "type": "desktop",
      "mode": "review",
      "document": {
        "title": "[[${fileManager.fileName}]]",
        "url": "[[${fileManager.fileUrl}]]",
        "fileType": "[[${fileManager.fileType}]]",
        "key": "[[${fileManager.fileId}]]",
        "info": {},
        "permissions": {
          "comment": true,
          "copy": true,
          "download": true,
          "edit": true,
          "print": true,
          "fillForms": true,
          "modifyFilter": true,
          "modifyContentControl": true,
          "review": true,
          "commentGroups": {}
        }
      },
      "editorConfig": {
        "mode": "edit",
        "callbackUrl": "http://192.168.43.164:8080/only-office/saveFile/[[${fileManager.fileName}]]",
        "lang": "zh",
        "createUrl": "",
        "user": {
          "id": "[[${user.userId}]]",
          "name": "[[${user.username}]]"
        },
        "customization": {
          "goback": {
            "url": "http://192.168.43.64:8080/OnlineEditorsExampleJava_war_exploded/IndexServlet"
          },
          "forcesave": false,
          "submitForm": false,
          "about": true,
          "feedback": false
        },
        "canCoAuthoring": true,
        "canUseHistory": true,
        "canHistoryClose": true,
        "canHistoryRestore": false,
        "canSendEmailAddresses": false,
        "canRequestEditRights": true,
        "canRequestClose": false,
        "canRename": false,
        "canMakeActionLink": true,
        "canRequestUsers": true,
        "canRequestSendNotify": true,
        "canRequestSaveAs": false,
        "canRequestInsertImage": true,
        "canRequestMailMergeRecipients": true
      },
      "width": "100%",
      "height": "100%",
      "events": {},
      "frameEditorId": "iframeEditor"
    }
    var connectEditor = function () {
      new DocsAPI.DocEditor("placeholder", config);
    };
    if (window.addEventListener) {
      window.addEventListener("load", connectEditor);
    } else if (window.attachEvent) {
      window.attachEvent("load", connectEditor);
    }
  </script>
  <title>在线编辑文档</title>
</head>
<body style="height: 100%; margin: 0;">
<div id="placeholder" style="height: 100%"></div>
</body>
</html>